package returnDataStruct;

import pojo.stadium;

public class locationData {
    private Long location_id;
    private String location_name;
    private String location;
    private int location_type_room;
    private int location_type_free;
    private int location_open_time;
    private int location_close_time;
    private String location_state;
    private String location_sports;

    public locationData(stadium s){
        setLocation_id(s.getStadium_id());
        setLocation_name(s.getName());
        setLocation(s.getLocation());
        switch (Integer.parseInt(s.getCategory())){
            case 1: setLocation_type_room(0);setLocation_type_free(0);break;
            case 2: setLocation_type_room(0);setLocation_type_free(1);break;
            case 3: setLocation_type_room(1);setLocation_type_free(0);break;
            case 4: setLocation_type_room(1);setLocation_type_free(1);break;
        }
        setLocation_open_time(s.getOpentime());
        setLocation_close_time(s.getClosetime());
        setLocation_state(s.getStadiumDisplay());
        setLocation_sports(s.getSports_id());
    }

    public Long getLocation_id() {
        return location_id;
    }

    public void setLocation_id(Long location_id) {
        this.location_id = location_id;
    }

    public String getLocation_name() {
        return location_name;
    }

    public void setLocation_name(String location_name) {
        this.location_name = location_name;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public int getLocation_type_room() {
        return location_type_room;
    }

    public void setLocation_type_room(int location_type_room) {
        this.location_type_room = location_type_room;
    }

    public int getLocation_type_free() {
        return location_type_free;
    }

    public void setLocation_type_free(int location_type_free) {
        this.location_type_free = location_type_free;
    }

    public int getLocation_open_time() {
        return location_open_time;
    }

    public void setLocation_open_time(int location_open_time) {
        this.location_open_time = location_open_time;
    }

    public int getLocation_close_time() {
        return location_close_time;
    }

    public void setLocation_close_time(int location_close_time) {
        this.location_close_time = location_close_time;
    }

    public String getLocation_state() {
        return location_state;
    }

    public void setLocation_state(String location_state) {
        this.location_state=location_state;

    }

    public String getLocation_sports() {
        return location_sports;
    }

    public void setLocation_sports(String location_sports) {
        this.location_sports = location_sports;
    }

    @Override
    public String toString() {
        return "locationData{" +
                "location_id=" + location_id +
                ", location_name='" + location_name + '\'' +
                ", location='" + location + '\'' +
                ", location_type_room=" + location_type_room +
                ", location_type_free=" + location_type_free +
                ", location_open_time=" + location_open_time +
                ", location_close_time=" + location_close_time +
                ", location_state='" + location_state + '\'' +
                ", location_sports='" + location_sports + '\'' +
                '}';
    }
}
